Memory system and method of controlling nonvolatile memory

ABSTRACT

According to one embodiment, a memory system detects a first block in which an elapsed time from a time point at which the block has been filled with write data exceeds a first period. The memory system notifies a host of a list of identifiers capable of identifying valid data portions stored in the first block or a list of identifiers capable of identifying all data portions stored in the first block. When receiving, from the host, a first copy request specifying one or more valid data portions stored in the first block as copy target data and specifying the second block group as a copy destination block group, the memory system copies the one or more valid data portions specified as the copy target data from the first block to the second block group.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority fromJapanese Patent Application No. 2019-157078, filed Aug. 29, 2019, theentire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to a technique forcontrolling a nonvolatile memory.

BACKGROUND

In recent years, memory systems comprising nonvolatile memories havebecome widespread.

As one of the above memory systems, a solid-state drive (SSD) based onNAND flash technology has been known. The SSD has been used as thestorage of various computers.

Recently, an attempt to improve the performance of the SSD by thecontrol from a host has started.

To improve the performance of the SSD, a new function for providing ahost with information useful for improving the performance needs to berealized.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating the relationship between a hostand a memory system according to an embodiment.

FIG. 2 is a diagram for explaining role-sharing between the memorysystem of the embodiment and the host.

FIG. 3 is a block diagram illustrating a configuration example of thememory system of the embodiment.

FIG. 4 is a block diagram illustrating the relationship between a NANDinterface and a plurality of NAND flash memory chips in the memorysystem of the embodiment.

FIG. 5 illustrates a configuration example of a block group (superblock) constructed by a set of a plurality of physical blocks.

FIG. 6 is a block diagram for explaining the operation of writing datahaving the same estimated lifetime into the same block, the operationof, when the elapsed time from the time point at which a block has beenfilled with write data exceeds a period, notifying the host of theidentifier of each of the data portions stored in the block, and theoperation of copying the data portions stored in the block to a blockgroup for storing data having another estimated lifetime in response toa request from the host.

FIG. 7 is a diagram for explaining the operation of, when the elapsedtime from the time point at which a block has been filled with writedata exceeds a period, notifying the host of the identifier of each ofthe valid data portions stored in the block.

FIG. 8 is a diagram for explaining lifetime reestimation operation anddata copy operation.

FIG. 9 is a block diagram for explaining the operation of writing datahaving the same estimated lifetime into the same block, the operationof, when the elapsed time from the time point at which a block has beenfilled with write data exceeds a period, notifying the host of theidentifier of each of the data portions stored in the block, theoperation of copying the data portions stored in the block to a blockgroup for storing data having another estimated lifetime in response toa request from the host, and the operation of invalidating a dataportion stored in the block in response to a request from the host.

FIG. 10 is a diagram for explaining the operation of changing a blockgroup in which data is stored from a block group for storing data havinga short lifetime to a group block for storing data having a longlifetime.

FIG. 11 is a flowchart illustrating the procedure of the operation ofallocating a block in which the degree of wear is less to data having along lifetime and allocating a block in which the degree of wear isgreat to data having a short lifetime, and the procedure of theoperation of changing the accuracy of program operation based on thelifetime of the data to be written.

FIG. 12 illustrates an example of a write command issued to the memorysystem of the embodiment.

FIG. 13 illustrates an example of an address recording request indicatedfrom the memory system of the embodiment to the host.

FIG. 14 illustrates an example of a read command issued to the memorysystem of the embodiment.

FIG. 15 illustrates an example of a copy command issued to the memorysystem of the embodiment.

FIG. 16 illustrates copy operation performed in the memory system of theembodiment.

FIG. 17 illustrates an example of an erase command issued to the memorysystem of the embodiment.

FIG. 18 illustrates an example of a trim command issued to the memorysystem of the embodiment.

FIG. 19 is a flowchart illustrating the procedure of write operationperformed in the memory system of the embodiment.

FIG. 20 is a flowchart illustrating copy operation and invalidationoperation performed in the memory system of the embodiment.

DETAILED DESCRIPTION

Various embodiments will be described hereinafter with reference to theaccompanying drawings.

In general, according to one embodiment, a memory system connectable toa host, comprises a nonvolatile memory including a plurality of blocks,and a controller electrically connected to the nonvolatile memory andconfigured to receive a write command from the host, the write commandincluding lifetime information capable of identifying a period to whichan estimated lifetime of write data belongs.

When the period identified by the lifetime information of the receivedwrite command is a first period, the controller writes the write datainto a first write destination block allocated for a first block groupfor storing data having an estimated lifetime corresponding to the firstperiod. When the first write destination block is filled with the writedata, the controller manages the first write destination block as ablock in which a valid data portion is stored and which belongs to thefirst block group, and allocates a new first write destination block forthe first block group.

When the period identified by the lifetime information of the receivedwrite command is a second period longer than the first period, thecontroller writes the write data into a second write destination blockallocated for a second block group for storing data having an estimatedlifetime corresponding to the second period. When the second writedestination block is filled with the write data, the controller managesthe second write destination block as a block in which a valid dataportion is stored and which belongs to the second block group, andallocates a new second write destination block for the second blockgroup.

The controller detects, of blocks in which valid data portions arestored and which belong to the first block group, a first block in whichan elapsed time from a time point at which the block has been filledwith the write data exceeds the first period. The controller notifiesthe host of a list of identifiers capable of identifying valid dataportions stored in the first block or a list of identifiers capable ofidentifying all data portions stored in the first block. When receiving,from the host, a first copy request specifying one or more valid dataportions stored in the first block as copy target data and specifyingthe second block group as a copy destination block group, the controllercopies the one or more valid data portions specified as the copy targetdata from the first block to the second block group.

This specification explains the relationship between a memory system anda host according to an embodiment with reference to FIG. 1.

The memory system is a semiconductor storage device configured to writedata into a nonvolatile memory and read data from the nonvolatilememory. The memory system is realized as a flash storage device 3 basedon NAND flash technology.

A host (host device) 2 is configured to control a plurality of flashstorage devices 3. The host 2 is realized by an information processingapparatus configured to use a flash array including a plurality of flashstorage devices 3 as storage. The information processing apparatus maybe a personal computer or a server computer.

Each flash storage device 3 may be utilized as one of a plurality offlash storage devices provided in a storage array. The storage array maybe connected to an information processing apparatus such as a servercomputer via a cable or a network. The storage array includes acontroller which controls the storage devices (for example, the flashstorage devices 3) in the storage array. When the flash storage devices3 are applied to the storage array, the controller of the storage arraymay function as the host of the flash storage devices 3.

Each flash storage device 3 may be realized as a first type storagedevice configured to manage mapping between each logical address used bythe host 2 to access the flash storage device 3 and each physicaladdress of the nonvolatile memory in the flash storage device 3 by usinga lookup table which functions as an address translation tablet. Alogical block address (LBA) is used as a logical address.

When each flash storage device 3 is realized as the first type storagedevice, the flash storage device 3 receives a write request specifyingthe logical address of write target data from the host 2. The flashstorage device 3 determines the physical storage location (block andpage) of the nonvolatile memory into which write data associated withthe received write request should be written, writes the write data intothe determined physical storage location, and associates the physicaladdress (block address and in-block offset) indicative of the physicalstorage location in which the write data is written with the logicaladdress by updating the lookup table. The in-block offset may berepresented by the page address of a page and an offset within the page.

When each flash storage device 3 is realized as the first type storagedevice, the flash storage device 3 receives a read request specifyingthe logical address of read target data and the length of the readtarget data from the host 2. The flash storage device 3 obtains thephysical address indicative of the physical storage location of thenonvolatile memory in which data corresponding to the logical addressspecified by the read request is stored by referring to the lookuptable. The flash storage device 3 reads data corresponding to thelogical address specified by the read request from the nonvolatilememory based on the obtained physical address.

Each flash storage device 3 may be realized as a second type storagedevice configured to notify the host 2 of a physical address.

When each flash storage device 3 is realized as the second type storagedevice, the flash storage device 3 may use an addressing scheme in whichthe method for specifying an address for writing is different from themethod for specifying an address for reading.

In this addressing scheme, a read request received from the host 2specifies the physical address (both the block address and the in-blockoffset) indicative of the physical storage location in the nonvolatilememory in which read target data is stored and the length of the readtarget data. The block address is the block address indicative of theblock in the nonvolatile memory in which the read target data is stored.The in-block offset is indicative of the physical storage location inthe block in which the read target data is stored. A write requestreceived from the host 2 may specify the logical address of write targetdata and the length of the write target data. In this case, the flashstorage device 3 determines both the write destination block and thewrite destination location in the write destination block. The flashstorage device 3 notifies the host 2 of the physical address (blockaddress and in-block offset) indicative of the physical storage locationof the nonvolatile memory in which the write target data is written. Thehost 2 updates the lookup table and maps the physical address indicatedby the SSD 3 to the logical address of the write target data.

When each flash storage device 3 is realized as the second type storagedevice, a write request received from the host 2 may specify the logicaladdress of write target data, the block address of the write destinationblock and the length of the write target data. In this case, the flashstorage device 3 determines only the write destination location in thiswrite destination block. The flash storage device 3 notifies the host 2of the physical address (block address and in-block offset) indicativeof the physical storage location of the nonvolatile memory in which thewrite target data is written. The host 2 updates the lookup table andmaps the physical address indicated by the SSD 3 to the logical addressof the write target data.

In each of the first type storage device and the second type storagedevice, in place of the logical address of write/read target data, a keyof a key-value store or the hash value of this key, etc., may be used asan identifier capable of identifying write/read target data.

Hereinafter, mainly, it is assumed that each flash storage device 3 isrealized as the second type storage device. It is also assumed that aninformation processing apparatus such as a server computer functions asthe host 2 for issuing a write/read request (write/read command) to theflash storage devices 3.

The host (server) 2 and a plurality of flash storage devices 3 areinterconnected (internally interconnected) via an interface 50. As theinterface 50 for interconnection, for example, a PCI Express (PCIe)(registered trademark), NVM Express (NVMe) (registered trademark),Ethernet (registered trademark) or NVMe over Fabrics (NVMeOF) may beused. However, the interface 50 for interconnection is not limited tothese examples.

A typical example of the server computer which functions as the host 2is a server computer (hereinafter, referred to as a server) in a datacenter.

In the case where the host 2 is realized by a server in a data center,the host (server) 2 may be connected to a plurality of end userterminals (clients) 61 via a network 60. The host 2 is capable ofproviding the end user terminals 61 with various services.

Examples of the services provided by the host (server) 2 include, forexample, (1) a Platform as a Service (PaaS) which provides each client(end user terminal 61) with a system running platform and (2) anInfrastructure as a Service (IaaS) which provides each client (end userterminal 61) with an infrastructure such as a virtual server.

A plurality of virtual machines may be run on the physical server whichfunctions as the host (server) 2. Each of the virtual machines runningon the host (server) 2 is capable of functioning as a virtual serverconfigured to provide a client (end user terminal 61) corresponding tothe virtual machine with various services. In each virtual machine, anoperating system and a user application used by an end user terminal 61corresponding to the virtual machine are executed.

In the host (server) 2, a flash translation layer (host FTL) may beexecuted. The host FTL includes a lookup table (LUT) which is an addresstranslation tablet for managing mapping between each identifier (tag)for identifying access target data and each physical address of thenonvolatile memory in each flash storage device 3. The host FTL iscapable of recognize data placement on the nonvolatile memory in eachflash storage device 3 by using the LUT.

Each flash storage device 3 includes a nonvolatile memory such as a NANDflash memory. The nonvolatile memory includes a plurality of blocks eachof which includes a plurality of pages. Each of these blocks is a unitof erasing data. Each of the pages is a unit of writing and readingdata.

Each flash storage device 3 is capable of executing low-levelabstraction. The low-level abstraction is a function for the abstractionof the nonvolatile memory. The low-level abstraction includes a functionof assisting data placement, etc. Examples of a function of assistingdata placement may include a function of allocating the writedestination block into which user data from the host 2 should bewritten, a function of determining the write destination location (thewrite destination block and the location in the write destination block)of user data, a function of notifying an upper layer (host 2) of thewrite destination location (block address and in-block offset) in whichuser data is written, etc.

Each flash storage device 3 executes various commands received from thehost 2. These commands include a write command for writing data into thenonvolatile memory in the flash storage device 3, and a read command forreading data from the nonvolatile memory. In the present embodiment,each read command specifies the physical address indicative of thestorage location in which the data to be read is stored. The physicaladdress is represented by the block address of the read target block andthe offset (in-block offset) indicative of the read target storagelocation in the read target block.

Each flash storage device 3 receives each read command specifying theblock address of the read target block and the offset indicative of theread target storage location in the read target block from the host 2,and performs data read operation in accordance with the received readcommand.

FIG. 2 illustrates role sharing between the flash storage device 3 andthe host 2.

In the host (server) 2, a plurality of virtual machines 401corresponding to a plurality of end users, respectively, are executed.In each virtual machine 401, an operating system and a user application402 used by a corresponding end user are executed.

In the host (server) 2, a plurality of I/O services 403 corresponding toa plurality of user applications 402, respectively, are executed. TheI/O services 403 may include a logical block address (LBA)-based blockI/O service, a key-value store service and the like. Each of the I/Oservices 403 includes a lookup table (LUT) which manages mapping betweeneach tag and each physical address of the flash storage device 3.

The tag is indicative of an identifier which can identify access targetdata. A typical example of the tag is a logical address such as an LBAalthough the tag is not limited to this example. Alternatively, a useraddress (for example, a key of a key-value store, or the hash value ofthe key) may be used as the tag.

The physical address of the flash storage device 3 is an address forspecifying the storage location (physical storage location) in thenonvolatile memory included in the flash storage device 3.

In the LBA-based block I/O service, an LUT which manages mapping betweeneach logical address (LBA) and each physical address of the flashstorage device 3 may be used.

In the key-value store service, an LUT which manages mapping betweeneach of keys (or the hash value of each key), each of physical addressesof the flash storage device 3 in which data corresponding to these keyare stored, and the data length of data corresponding to each of thesekeys may be used.

Each end user can select the addressing method (an LBA, a key of akey-value store, the hash value of the key, etc.) which should be used.

In the host (server) 2, a plurality of write buffers (WBs) 404corresponding to a plurality of virtual machines 401, respectively, maybe managed.

Write data from a user application 402 may be temporarily stored in thewrite buffer (WB) 404 for a virtual machine 401 corresponding to theuser application 402.

Transmission of a command from the host (server) 2 to the flash storagedevice 3 and return of a response of command completion, etc., from theflash storage device 3 to the host (server) 2 are executed via an I/Oqueue 500 which is present in each of the host (server) 2 and the flashstorage device 3.

The flash storage device 3 is capable of managing each of a plurality ofareas obtained by logically dividing the nonvolatile memory in the flashstorage device 3 as a QoS domain 601. Each QoS domain 601 is a subset ofa plurality of blocks included in the nonvolatile memory. Each of theblocks included in the nonvolatile memory belongs to only one QoS domain601. The same block does not simultaneously belong to different QoSdomains 601.

Each QoS domain 601 is identified by an identifier called a QoS domainID. These QoS domain IDs are used as a plurality of identifiers foraccessing the areas (QoS domains), respectively.

In the present embodiment, each write command specifies the tag of writedata (for example, the LBA of write data) and the length of the writedata. When a write command specifying a tag such as an LBA and thelength of write data is received from the host 2, the flash storagedevice 3 selects a block from a group of free blocks and allocates theselected block as a write destination block. In the case where the flashstorage device 3 is configured to manage a plurality of QoS domains 601,a common block group 602 shared by the QoS domains 601 may be used as agroup of free blocks.

The write destination block is indicative of the block into which datashould be written. The write destination block may be a single physicalblock, or a block group including a set of a plurality of physicalblocks. Each block group is also called a super block. Each block groupincludes, for example, a plurality of physical blocks selected fromdifferent nonvolatile memory dies (also referred to as nonvolatilememory chips). Thus, it is possible to write data into a plurality ofphysical blocks belonging to a block group in parallel, and it ispossible to read data from these physical blocks in parallel.

Each free block is indicative of a block in a state (free state) whereit can be reused (reallocated) as a new write destination block. Atypical example of a free block is a block (physical block or superblock) in which valid data is not stored. Valid data is indicative ofthe latest data associated with a tag such as an LBA. In other words,data linked as the latest data from the LUT (logical-to-physical addresstranslation tablet) of the host 2 is valid data.

Invalid data is indicative of data which is not associated with a tagsuch as an LBA. Data which is not linked from the LUT of the host 2 isinvalid data. For example, when updated data corresponding to an LEA iswritten into the flash storage device 3, previous data corresponding tothe LBA becomes invalid data.

When data associated with a received write command is written into awrite destination block, the flash storage device 3 transmits the tag ofthe data, the length of the data and the physical address (block addressand in-block offset) indicative of the physical storage location inwhich the data is written to the host 2 as an address recording request.The address recording request is used as a physical address notificationmessage for notifying the host 2 of the physical address (block addressand in-block offset) indicative of the physical storage location inwhich the data is written.

The block address is an address for identifying the write destinationblock. The in-block offset is indicative of the physical storagelocation in the write destination super block in which the data iswritten.

In accordance with the address recording request, the host 2 is capableof updating the LUT such that the physical address (block address andin-block offset) can be associated with the tag of the data such as anLBA.

FIG. 3 illustrates a configuration example of the flash storage device3.

The flash storage device 3 comprises a controller 4 and a nonvolatilememory (NAND flash memory) 5. The flash storage device 3 may comprise arandom access memory such as a DRAM 6.

The NAND flash memory 5 includes a memory cell array including aplurality of memory cells arrayed in matrix. The NAND flash memory 5 maybe either a flash memory comprising a two-dimensional structure or aflash memory comprising a three-dimensional structure. The memory cellarray of the NAND flash memory 5 includes a plurality of blocks BLK0 toBLKm−1. Each of blocks BLK0 to BLKm−1 includes a plurality of pages(here, pages P0 to Pn−1). Blocks BLK0 to BLKm−1 function as erase units.Blocks may be called erase blocks, physical blocks or physical eraseblocks. Pages P0 to Pn−1 are the units of data write operation and dataread operation.

The controller 4 is electrically connected to the NAND flash memory 5which is a nonvolatile memory via a NAND interface 13 such as a ToggleNAND flash interface and an open NAND flash interface (ONFI). Thecontroller 4 operates as a memory controller configured to control theNAND flash memory 5. The controller 4 may be realized by a circuit suchas a System-on-a-chip (SoC).

As shown in FIG. 4, the NAND flash memory 5 may include a plurality ofNAND flash memory dies (NAND flash memory chips). Each NAND flash memorydie is independently operable. Thus, the NAND flash memory dies functionas parallel operational units. FIG. 4 illustrates a case where 16channels Ch.0 to Ch.15 are connected to the NAND interface 13, and twoNAND flash memory dies are connected to each of 16 channels Ch.0 toCh.15. In this case, 16 NAND flash memory dies #0 to #15 connected tochannels Ch.0 to Ch.15 may be organized as bank #0. The remaining 16NAND flash memory dies #16 to #31 connected to channels Ch.0 to Ch.15may be organized as bank #1. The banks function as the units of causinga plurality of memory modules to operate in parallel by bankinterleaving. In the configuration example of FIG. 4, up to 32 NANDflash memory dies can be operated in parallel by 16 channels and bankinterleaving using two banks.

Erase operation may be performed for either each physical block or eachsuper block including a set of physical blocks which are operable inparallel. Each super block may include 32 physical blocks in totalselected from NAND flash memory dies #0 to #31 one by one although theconfiguration is not limited to this example. Each of NAND flash memorydies #0 to #31 may comprise a multiplane structure. For example, wheneach of NAND flash memory dies #0 to #31 comprises a multiplanestructure including two planes (plane #0 and plane #1), the total numberof planes included in the NAND flash memory 5 is 64. Each super blockmay include 64 physical blocks in total selected from the 64 planesincluded in the NAND flash memory 5 one by one.

FIG. 5 illustrates a configuration example of some super blocks SB.

Super block SB0 having super block address 0 comprises physical blockBLK0 included in plane #0 of NAND flash memory die #0 (die #0) andhaving block address 0, physical block BLK0 included in plane #1 of NANDflash memory die #0 (die #0) and having block address 0, physical blockBLK0 included in plane #0 of NAND flash memory die #1 (die #1) andhaving block address 0, physical block BLK0 included in plane #1 of NANDflash memory die #1 (die #1) and having block address 0, physical blockBLK0 included in plane #0 of NAND flash memory die #2 (die #2) andhaving block address 0, physical block BLK0 included in plan #1 of NANDflash memory die #2 (die #2) and having block address 0, . . . ,physical block BLK0 included in plane #0 of NAND flash memory die #31(die #31) and having block address 0, and physical block BLK0 includedin plane #1 of NAND flash memory die #31 (die #31) and having blockaddress 0.

Similarly, super block SB255 having super block address 255 comprisesphysical block BLK255 included in plane #0 of NAND flash memory die #0(die #0) and having block address 255, physical block BLK255 included inplane #1 of NAND flash memory die #0 (die #0) and having block address255, physical block BLK255 included in plane #0 of NAND flash memory die#1 (die #1) and having block address 255, physical block BLK255 includedin plane #1 of NAND flash memory die #1 (die #1) and having blockaddress 255, physical block BLK255 included in plane #0 of NAND flashmemory die #2 (die #2) and having block address 255, physical blockBLK255 included in plan #1 of NAND flash memory die #2 (die #2) andhaving block address 255, . . . , physical block BLK255 included inplane #0 of NAND flash memory die #31 (die #31) and having block address255, and physical block BLK255 included in plane #1 of NAND flash memorydie #31 (die #31) and having block address 255.

Now, this specification explains the configuration of the controller 4of FIG. 3.

The controller 4 includes a host interface 11, a CPU 12, the NANDinterface 13, a DRAM interface 14, a direct memory access controller(DMAC) 15, an ECC encode/decode unit 16, etc. The host interface 11, theCPU 12, the NAND interface 13, the DRAM interface 14, the DMAC 15 andthe ECC encode/decode unit 16 are interconnected via a bus 10.

The host interface 11 is a host interface circuit configured to performcommunication with the host 2. The host interface 11 may be, forexample, a PCIe controller (NVMe controller). When the flash storagedevice 3 is connected to the host 2 via Ethernet (registered trademark),the host interface 11 may be an NVMe over Fabrics (NVMeOF) controller.

The host interface 11 receives various commands from the host 2. Thesecommands include a write command, a read command, a copy command, anerase command, a trim command and other various commands.

The CPU 12 is a processor configured to control the host interface 11,the NAND interface 13, the DRAM interface 14, the DMAC 15 and the ECCencode/decode unit 16. The CPU 12 loads a control program (firmware)from the NAND flash memory 5 or a ROM (not shown) into the DRAM 6 whenthe flash storage device 3 is powered on, and performs various processesby running the firmware. The firmware may be loaded onto an SRAM (notshown) in the controller 4. The CPU 12 is capable of performing acommand process for executing various commands from the host 2, etc. Theoperation of the CPU 12 is controlled by the firmware executed by theCPU 12. A command process may be partially or entirely performed byexclusive hardware in the controller 4.

The CPU 12 is capable of functioning as a write control unit 21, a datanotification unit 22, a read control unit 23 and a copy control unit 24.A part of or the entire part of each of the write control unit 21, thedata notification unit 22, the read control unit 23 and the copy controlunit 24 may be realized by exclusive hardware in the controller 4.

The write control unit 21 is capable of processing a write commandincluding lifetime information. The lifetime information is indicativeof information which can identify the period to which the estimatedlifetime of write data belongs. The lifetime of write data is indicativeof the period from the time point at which write data is generated tothe time point at which the data is invalidated by erasing or updating(rewriting) the data. The lifetime information included in a writecommand may be indicative of the time length of a period correspondingto the estimated lifetime of write data associated with the writecommand. Alternatively, in the case where the correspondencerelationship between a plurality of periods and a plurality ofidentifiers associated with these periods is determined in advance, thelifetime information included in a write command may be an identifierassociated with a period corresponding to the estimated lifetime ofwrite data associated with the write command.

The write control unit 21 writes write data having the same estimatedlifetime into the same write destination block, based on each writecommand including lifetime information. The write control unit 21returns the physical address (block address and in-block offset)indicative of the storage location (physical storage location) of theNAND flash memory 5 in which the write data is written.

For example, when the period identified by the lifetime informationincluded in a received write command is indicative of a first period(for example, a day), the write control unit 21 writes write dataassociated with the write command into a write destination blockallocated for a first block group for storing data having an estimatedlifetime corresponding to the first period (for example, a day). Thewrite control unit 21 returns the physical address indicative of thestorage location in the write destination block in which the write datais written to the host 2.

In this way, write data associated with each write command includinglifetime information which can identify the first period (for example, aday) is written to the write destination block allocated for the firstblock group. When this write destination block is fully filled withwrite data, the write control unit 21 allocates a new write destinationblock for the first block group. The state of the write destinationblock filled with write data is changed from an opened state to a closedstate. This write destination block is managed by the controller 4 as anactive block including valid data and belonging to the first blockgroup.

In other words, each block used as a write destination block for thefirst block group is managed by the controller 4 as an active blockincluding valid data and belonging to the first block group. Regardingeach block which was used as a write destination block for the firstblock group, when the elapsed time from the time point at which theblock has been fully filled with write data exceeds the first period(for example, a day), there is a high possibility that all the data inthe block is invalided by erasing or updating (rewriting) the data.Regarding a block in which all the data has been invalidated, the blockcan be caused to be a free block by only applying erase operation to theblock without executing garbage collection for copying valid data toanother block. For example, in the case where the host 2 manages thevalidity/invalidity of the data portions in each block by using the hostFTL, at the time point when all the data portions in an active block isinvalidated by erasing or updating (rewriting) the data, the host 2 maytransmit a command (erase command) for releasing the active block as afree block to the flash storage device 3. In the case where the flashstorage device 3 manages the validity/invalidity of the data portions ineach block, at the time point when all the data portions in an activeblock is invalidated by erasing or updating (rewriting) the data, theflash storage device 3 may automatically perform operation for releasingthe active block as a free block.

In this way, it is possible to reduce the frequency necessary forexecuting garbage collection for copying only valid data from a blockhaving both valid data and invalid data to another block, therebyminimizing the write amplification of the flash storage device 3.

For example, when the period identified by the lifetime informationincluded in a received write command is a second period (for example,three days), the write control unit 21 writes write data associated withthe write command into a write destination block allocated for a secondblock group for storing data having an estimated lifetime correspondingto the second period (for example, three days). The write control unit21 returns the physical address indicative of the storage location inthe write destination block in which the write data is written to thehost 2.

In this way, write data associated with each write command includinglifetime information which can identify the second period (for example,three days) is written to the write destination block allocated for thesecond block group. When this write destination block is fully filledwith write data, the write control unit 21 allocates a new writedestination block for the second block group. The state of the writedestination block filled with write data is changed from an opened stateto a closed state. This write destination block is managed by thecontroller 4 as an active block including valid data and belonging tothe second block group.

In other words, each block which was used as a write destination blockfor the second block group is managed by the controller 4 as an activeblock including valid data and belonging to the second block group.Regarding each block which was used as a write destination block for thesecond block group, when the elapsed time from the time point at whichthe block has been fully filled with write data exceeds the secondperiod (for example, three days), there is a high possibility that allthe data in the block is invalided by erasing or updating (rewriting)the data. Regarding a block in which all the data has been invalidated,the block can be caused to be a free block by only applying eraseoperation to the block without executing garbage collection for copyingvalid data to another block.

For example, when the period identified by the lifetime informationincluded in a received write command is a third period (for example,seven days), the write control unit 21 writes write data associated withthe write command into a write destination block allocated for a thirdblock group for storing data having an estimated lifetime correspondingto the third period (for example, seven days). The write control unit 21returns the physical address indicative of the storage location in thewrite destination block in which the write data is written to the host2.

In this way, write data associated with each write command includinglifetime information which can identify the third period (for example,seven days) is written into the write destination block allocated forthe third block group. When this write destination block is fully filledwith write data, the write control unit 21 allocates a new writedestination block for the third block group. The state of the writedestination block filled with write data is changed from an opened stateto a closed state. This write destination block is managed by thecontroller 4 as an active block including valid data and belonging tothe third block group.

In other words, each block which was used as a write destination blockfor the third block group is managed by the controller 4 as an activeblock including valid data and belonging to the third block group.Regarding each block which was used as a write destination block for thethird block group, when the elapsed time from the time point at whichthe block has been fully filled with write data exceeds the third period(for example, seven days), there is a high possibility that all the datain the block is invalided by erasing or updating (rewriting) the data.Regarding a block in which all the data has been invalidated, the blockcan be caused to be a free block by only applying erase operation to theblock without executing garbage collection for copying valid data toanother block.

The actual lifetime of data may be changed. Therefore, even if the host2 determined data as data having a lifetime belonging to the firstperiod (for example, a day) of a plurality of periods by the previousestimation of lifetime, the actual lifetime of the data may longer thanthe first time.

In this case, write amplification may be reduced when the data is dealtwith as data having a lifetime belonging to a period (for example, threeor seven days) longer than the first period rather than continuouslydealing with the data as data having a lifetime belonging to the firstperiod (for example, a day).

Thus, for example, the data notification unit 22 detects, of the blocks(an active block group belonging to the first block group) used as writedestination blocks for the first block group, a block in which theelapsed time from the time point at which the block has been filled withwrite data exceeds the first period (for example, a day). The detectedblock is a block which still has valid data even after the first period(for example, a day) passed.

The data notification unit 22 notifies the host 2 of a list ofidentifiers (for example, LBAs) which can identify the valid dataportions stored in the detected block or a list of identifiers (forexample, LBAs) which can identify all the data portions stored in thedetected block.

In the case where the flash storage device 3 is realized as the firsttype storage device, as the controller 4 manages the validity/invalidityof the data portions stored in each block, the data notification unit 22of the controller 4 is capable of notifying the host 2 of a list ofidentifiers (for example, LBAs) which can identify the valid dataportions stored in the detected block.

In the case where the flash storage device 3 is realized as the secondtype storage device, the validity/invalidity of the data portions storedin each block is basically managed by the host 2. Thus, the datanotification unit 22 of the controller 4 may notify the host 2 of a listof identifiers (for example, LBAs) which can identify all the dataportions stored in the detected block.

Even in the case where the flash storage device 3 is realized as thesecond type storage device, the controller 4 is capable of managing thevalidity/invalidity of the data portions stored in each block based oneach trim command received from the host 2. In this case, the controller4 may notify the host 2 of a list of identifiers (for example, LBAs)which can identify the valid data portions stored in the detected block.

Based on the LBA list received from the flash storage device 3, the host2 is capable of obtaining a chance to reestimate the lifetime of eachdata portion (valid data portion) stored in a block in which the elapsedtime from the time point at which the block has been filled with writedata exceeds the first period (for example, a day). Based on the resultof the reestimation of the lifetime of each data portion, the host 2 iscapable of transmitting, to the flash storage device 3, a copy requestspecifying one or more valid data portions stored in the block as copytarget data and specifying a block group (for example, the second blockgroup or the third block group) different from the first block group asthe copy destination block group. In this way, data in which the actuallifetime is longer than the first period (for example, a day) can berestored in the same block as the block in which other datacorresponding to a period longer than the first period is stored.

When a read command specifying a physical address (block address andin-block offset) is received from the host 2, the read control unit 23reads data from the NAND flash memory 5 based on the block address andthe in-block offset. The read target block is specified by the blockaddress. The read target physical storage location in the block isspecified by the in-block offset.

The copy control unit 24 receives, from the host 2, a copy requestspecifying one or more valid data portions stored in the detected blockas copy target data and specifying the different second block group asthe copy destination block group. Based on the received copy request,the copy control unit 24 copies one or more valid data portionsspecified as copy target data from the detected block to the block groupspecified as the copy destination block group. In this way, a dataportion which exceeds the lifetime previously expected can be copied toa block group used for storing data having the same lifetime as thereestimated lifetime of the data portion.

After completing this copy operation, to cause the block to be a freeblock, the host 2 may transmit an erase command specifying the block tothe flash storage device 3. Based on the receipt of the erase command,the controller 4 performs the erase operation of the block specified bythe erase command and manages the block as a free block.

The NAND interface 13 is a memory control circuit configured to controlthe NAND flash memory 5 under the control of the CPU 12.

The DRAM interface 14 is a DRAM control circuit configured to controlthe DRAM 6 under the control of the CPU 12. The storage region of theDRAM 6 is used to store a block management table 32. The blockmanagement table 32 includes a plurality of management tablescorresponding to a plurality of blocks in the NAND flash memory 5,respectively. Each management table is used to store the managementinformation (metadata) for managing a block corresponding to themanagement table. The metadata may include the number of rewrites (thenumber of program/erase cycles) of the corresponding block, anopened/closed state, etc., although the configuration is not limited tothis example. The metadata may include valid bit map data indicative ofthe validation/invalidation of each data portion stored in thecorresponding block.

The opened/closed state is indicative of whether the block is in anopened state or a closed state. The opened state is indicative of astate where the block is in use as a write destination block. The closedstate is indicative of a state where the block is filled with data andmanaged as an active block.

In the case where the flash storage device is realized as the first typestorage device, the storage region of the DRAM 6 is used to store alookup table (LUT) 33 which functions as an address translation tablet.

The DMAC 15 performs data transfer between the memory (write buffer) inthe host 2 and the DRAM 6 (internal buffer) under the control of the CPU12. When write data should be transferred from the write buffer of thehost 2 to the internal buffer, the CPU 12 specifies the transfer sourceaddress indicative of the location on the write buffer, the data sizeand the transfer destination address indicative of the location on theinternal buffer with respect to the DMAC 15.

When data should be written into the NAND flash memory 5, the ECCencode/decode unit 16 encodes (ECC-encodes) the write data to bewritten, thereby adding an error correction code (ECC) to the data. Whendata is read from the NAND flash memory 5, the ECC encode/decode unit 16performs the error correction of the data (ECC decoding), using the ECCadded to the read data.

FIG. 6 is a block diagram for explaining the operation of writing datahaving the same estimated lifetime into the same block, the operationof, when the elapsed time from the time point at which a block has beenfilled with write data exceeds a period, notifying the host 2 of theidentifier of each of the data portions stored in the block, and theoperation of copying the data portions stored in the block to a blockgroup for storing data having another estimated lifetime in response toa request from the host 2.

The host 2 includes a lifetime estimation unit 201. The lifetimeestimation unit 201 estimates the lifetime of the data to be writteninto the flash storage device 3, and classifies the estimated lifetimeof the data into a plurality of lifetime groups (for example, group #1,group #2, group #3 and group #4) having periods different from eachother. FIG. 6 illustrates a case where a period corresponding to group#1 is a day, and a period corresponding to group #2 is three days, and aperiod corresponding to group #3 is seven days, and a periodcorresponding to group #4 is a month.

When the estimated lifetime of the data to be written is less than orequal to a day, the lifetime estimation unit 201 classifies the datainto group #1. In this case, the host 2 transmits a write commandincluding lifetime information which can identify a period (here, a day)corresponding to group #1 to the flash storage device 3. The lifetimeinformation may be indicative of a time length corresponding to a day.Alternatively, when the flash storage device 3 is notified of thecorrespondence relationship between group #1 and a period (a day)corresponding to group #1 in advance, the lifetime information may beindicative of an identifier associated with a period (a day)corresponding to group #1, for example, the identifier of group #1.

When the estimated lifetime of the data to be written is greater than aday and less than or equal to three days, the lifetime estimation unit201 classifies the data into group #2. In this case, the host 2transmits a write command including lifetime information which canidentify a period (here, three days) corresponding to group #2 to theflash storage device 3. The lifetime information may be indicative of atime length corresponding to three days. Alternatively, when the flashstorage device 3 is notified of the correspondence relationship betweengroup #2 and a period (three days) corresponding to group #2 in advance,the lifetime information may be indicative of an identifier associatedwith a period (three days) corresponding to group #2, for example, theidentifier of group #2.

When the estimated lifetime of the data to be written is greater thanthree days and less than or equal to seven days, the lifetime estimationunit 201 classifies the data into group #3. In this case, the host 2transmits a write command including lifetime information which canidentify a period (here, seven days) corresponding to group #3 to theflash storage device 3. The lifetime information may be indicative of atime length corresponding to seven days. Alternatively, when the flashstorage device 3 is notified of the correspondence relationship betweengroup #3 and a period (seven days) corresponding to group #3 in advance,the lifetime information may be indicative of an identifier associatedwith a period (seven days) corresponding to group #3, for example, theidentifier of group #3.

When the estimated lifetime of the data to be written is greater thanseven days and less than or equal to a month, the lifetime estimationunit 201 classifies the data into group #4. In this case, the host 2transmits a write command including lifetime information which canidentify a period (here, a month) corresponding to group #4 to the flashstorage device 3. The lifetime information may be indicative of a timelength corresponding Lo a period (here, a month) corresponding to group#4. Alternatively, when the flash storage device 3 is notified of thecorrespondence relationship between group #4 and a period (a month)corresponding to group #4 in advance, the lifetime information may beindicative of an identifier associated with a period (here, a month)corresponding to group #4, for example, the identifier of group #4.

In the flash storage device 3, a flash block pool including four blockgroups 41 to 44 corresponding to four groups (group #1 to group #4),respectively, is managed. Each free block is managed by a free blockpool 45.

Block group 41 is a set of blocks for storing data having an estimatedlifetime corresponding to the period (a day) of group #1. In the flashstorage device 3, firstly, a free block is selected from the free blockpool 45, and the selected free block is allocated as a write destinationblock for block group 41. Write data associated with each write commandincluding lifetime information for identifying a period corresponding togroup #1 is written into the write destination block allocated for blockgroup 41. When this write destination block is fully filled with writedata, in other words, when data is written into the last storagelocation (last page) of the write destination block, a free block isselected from the free block pool 45 again, and the selected free blockis allocated as a new write destination block for block group 41. Thestate of the block filled with write data transitions from an openedstate to a closed state, and the block is managed as an active blockbelonging to block group 41 and including valid data.

FIG. 6 illustrates a case where block BLK1, block BLK2, block BLK3,block BLK4, block BLK5, block BLK6, block BLK7 and block BLK8 areallocated as a write destination block for block group 41 in this order.Block BLK8 is the current write destination block for block group 41.Block BLK1 is the oldest block of the blocks used as a write destinationblock for block group 41.

Block group 42 is a set of blocks for storing data having an estimatedlifetime corresponding to the period (three days) of group #2. In theflash storage device 3, a free block is selected from the free blockpool 45, and the selected free block is allocated as a write destinationblock for block group 42. Write data associated with each write commandincluding lifetime information for identifying a period corresponding togroup #2 is written into the write destination block allocated for blockgroup 42. When this write destination block is fully filled with writedata, a free block is selected from the free block pool 45 again, andthe selected free block is allocated as a new write destination blockfor block group 42. The state of the block filled with write datatransitions from an opened state to a closed state, and the block ismanaged as an active block belonging to block group 42 and includingvalid data.

FIG. 6 illustrates a case where block BLK21, block BLK22, block BLK23,block BLK24, block BLK25 and block BLK26 are allocated as a writedestination block for block group 42 in this order. Block BLK26 is thecurrent write destination block for block group 42. Block BLK21 is theoldest block of the blocks used as a write destination block for blockgroup 42.

Block group 43 is a set of blocks for storing data having an estimatedlifetime corresponding to the period (seven days) of group #3. In theflash storage device 3, a free block is selected from the free blockpool 45, and the selected free block is allocated as a write destinationblock for block group 43. Write data associated with each write commandincluding lifetime information for identifying a period corresponding togroup #3 is written into the write destination block allocated for blockgroup 43. When this write destination block is fully filled with writedata, a free block is selected from the free block pool 45 again, andthe selected free block is allocated as a new write destination blockfor block group 43. The state of the block filled with write datatransitions from an opened state to a closed state, and the block ismanaged as an active block belonging to block group 43 and includingvalid data.

FIG. 6 illustrates a case where block BLK31, block BLK32, block BLK33and block BLK34 are allocated as a write destination block for blockgroup 43 in this order. Block BLK34 is the current write destinationblock for block group 43. Block BLK31 is the oldest block of the blocksused as a write destination block for block group 43.

Block group 44 is a set of blocks for storing data having an estimatedlifetime corresponding to the period (a month) of group #4. In the flashstorage device 3, a free block is selected from the free block pool 45,and the selected free block is allocated as a write destination blockfor block group 44. Write data associated with each write commandincluding lifetime information for identifying a period corresponding togroup #4 is written into the write destination block allocated for blockgroup 44. When this write destination block is fully filled with writedata, a free block is selected from the free block pool 45 again, andthe selected free block is allocated as a new write destination blockfor block group 44. The state of the block filled with write datatransitions from an opened state to a closed state, and the block ismanaged as an active block belonging to block group 44 and includingvalid data.

FIG. 6 illustrates a case where block BLK41, block BLK42, block BLK43,block BLK44, block BLK45, block BLK46 and block BLK47 are allocated as awrite destination block for block group 44 in this order. Block BLK47 isthe current write destination block for block group 44. Block BLK41 isthe oldest block of the blocks used as a write destination block forblock group 44.

Regarding each of block group 41, block group 42 and block group 43, thecontroller 4 detects a block in which the elapsed time from the timepoint at which the block has been filled with write data exceeds aperiod (a day, three days or seven days) corresponding to the blockgroup.

The elapsed time from the time point at which a block has been filledwith write data is indicative of the elapsed time from the time point atwhich data has been written into the last storage location of the block.In the case where a write destination block is composed of a singlephysical block, the last storage location is the last page of thephysical block. In the case where a write destination block is composedof, for example, a single super block, the last storage location is thelast page of the last physical block of the physical blocks included inthe super block. For example, in super block SB0 of FIG. 5, the lastpage of physical block BLK0 included in plane #1 of NAND flash memorydie #31 (die #31) is the last storage location of super block SB0.

It is assumed that, in block group 41, the elapsed time from the timepoint at which block BLK1 has been filled with write data exceeds aperiod (a day) corresponding to block group 41.

In this case, to provide the host 2 with a chance to reestimate thelifetime of the valid data portions in block BLK1, the controller 4notifies the host 2 of a list of LBAs of the valid data portions storedin block BLK1 or a list of LBAs of all the data portions stored in blockBLK1.

Based on the LBA list indicated by the flash storage device 3, the host2 reestimates the lifetime of each valid data portion stored in blockBLK1 (that is, each valid data portion which exceeds a periodcorresponding to the lifetime previously estimated).

For example, when the reestimated new lifetime of a valid data portionstored in block BL1 is three days, the host 2 transmits, to the flashstorage device 3, a copy request (copy command) specifying the validdata portion as copy target data and specifying block group 42 (forexample, the current write destination block BLK26 of block group 42) asa copy destination block group.

For example, when the reestimated new lifetime of a valid data portionstored in block BL1 is seven days, the host 2 transmits, to the flashstorage device 3, a copy request (copy command) specifying the validdata portion as copy target data and specifying block group 43 (forexample, the current write destination block BLK34 of block group 43) asa copy destination block group.

For example, when the reestimated new lifetime of a valid data portionstored in block BL1 is a month, the host 2 transmits, to the flashstorage device 3, a copy request (copy command) specifying the validdata portion as copy target data and specifying block group 44 (forexample, the current write destination block BLK47 of block group 44) asa copy destination block group.

Based on the copy request received from the host 2, the controller 4copies the valid data portion specified as copy target data by the copyrequest to the block group (block group 42, block group 43 or blockgroup 44) specified as a copy destination block group by the copyrequest.

After completing the copy operation of the necessary valid data portionsin block BLK1, the host 2 may transmit an erase command specifying blockBLK1 to the flash storage device 3 to release block BLK1 as a freeblock. Based on the receipt of the erase command, the controller 4performs erase operation for block BLK1 and manages block BLK1 by thefree block pool 45. In other words, block BLK1 is moved to the freeblock pool 45.

When the host 2 determines that all the valid data portions specified bythe LBA list are unnecessary data, the host 2 may immediately transmitan erase command specifying block BLK1 to the flash storage device 3without transmitting a copy request to the flash storage device 3.

Similarly, for example, when, in block group 42, the elapsed time fromthe time point at which block BLK21 has been filled with write dataexceeds a period (three days) corresponding to block group 42, thecontroller 4 notifies the host 2 of a list of the LBAs of the valid dataportions stored in block BLK21 or a list of the LBAs of all the dataportions stored in block BLK21.

For example, when, in block group 43, the elapsed time from the timepoint at which block BLK31 has been filled with write data exceeds aperiod (seven days) corresponding to block group 43, the controller 4notifies the host 2 of a list of the LBAs of the valid data portionsstored in block BLK31 or a list of the LBAs of all the data portionsstored in block BLK31.

FIG. 7 is a diagram for explaining the operation of, when the elapsedtime from the time point at which a block has been filled with writedata exceeds a period, notifying the host 2 of the identifier of each ofthe valid data portions stored in the block.

It is assumed that the elapsed time from the time point at which blockBLK1 belonging to block group 41 has been filled with write data exceedsa period (a day) corresponding to block group 41. It is also assumedthat block BLK1 is composed of four pages from page 0 to page 3, andfour data portions are stored in each page.

As illustrated in the upper part of FIG. 7, in page 0 of block BLK1, forexample, data portion D1 corresponding to LBA11, data portion D2corresponding to LBA12, data portion D3 corresponding to LBA21 and dataportion D4 corresponding to LBA25 are stored. In page 1 of block BLK1,for example, data portion D5 corresponding to LBA31, data portion D6corresponding to LBA32, data portion D7 corresponding to LBA33 and dataportion D0 corresponding to LBA40 are stored. In page 2 of block BLK1,for example, data portion D9 corresponding to LBA51, data portion D10corresponding to LBA52, data portion D11 corresponding to LBA61 and dataportion D12 corresponding to LBA62 are stored. In page 3 of block BLK1,for example, data portion D13 corresponding to LBA71, data portion D14corresponding to LBA72, data portion D15 corresponding to LBA73 and dataportion D16 corresponding to LBA74 are stored. Each of these LBAs may bestored in block BLK1 together with a corresponding data portion.

The middle part of FIG. 7 illustrates a valid bit map (here,“1110100001001000”) corresponding to block BLK1. In the valid bit map,each bit “1” is indicative that the data portion in a storage locationcorresponding to the bit is valid data. In the valid bit map, each bit“0” is indicative that the data portion in a storage locationcorresponding to the bit is invalid data.

The controller 4 detects each of valid data portion D1, valid dataportion D2, valid data portion D3, valid data portion D5, valid dataportion D10 and valid data portion D13 stored in block BLK1 by referringto the valid bit map “1110100001001000”.

As illustrated in the lower part of FIG. 7, the controller 4 notifiesthe host 2 of a list of LBAs (LBA11, LBA12, LBA21, LBA31, LBA52 andLBA71) corresponding to valid data portion D1, valid data portion D2,valid data portion D3, valid data portion D5, valid data portion D10 andvalid data portion D13, respectively.

In the case where the host 2 manages the validity/invalidity of eachdata portion, the controller 4 may notify the host 2 of a list of LBAs(LBA11, LBA12, LBA21, LBA25, LBA31, LBA32, LBA33, LBA40, LBA51, LBA52,LBA61, LBA62, LBA71, LBA72, LBA73 and LBA74) corresponding to all thedata portions stored in block BLK1.

FIG. 8 is a diagram for explaining lifetime reestimation operation anddata copy operation.

When the host 2 receives an LBA list from the flash storage device 3,the host 2 reestimates the lifetime of each valid data portion specifiedby the LBA list, thereby obtaining the new estimated lifetime of eachvalid data portion (step S11). The host 2 reclassifies these valid dataportions into group #1 to group #4 based on the new estimated lifetime(reestimated lifetime) of each valid data portion, thereby determining acopy destination block group corresponding to each valid data portion(step S12). When a valid data portion to be copied to another blockgroup is present, the host 2 transmits, to the flash storage device 3, acopy request specifying the valid data as copy target data andspecifying a block group corresponding to the group into which the validdata is reclassified as a copy destination block group (step S13).

The copy target data may be specified by a copy source physical address.For example, when data D1 of block BLK1 illustrated in FIG. 7 is copytarget data, the copy source physical address is represented by blockaddress=BLK1, page address=0 and offset=0. The copy destination blockgroup may be specified by the identifier identifying one of groups #2 to#4, or may be specified by the copy destination block address indicativeof the copy destination block in the copy destination block group.

It is assumed that data D1 of block BLK1 is copied to the current writedestination block BLK34 of block group 43. In this case, for example, acopy request specifying the copy source physical address (blockaddress=BLK1, page address=0, offset=0) and the copy destination blockaddress (block address=BLK34) may be transmitted from the host 2 to theflash storage device 3. Based on the receipt of this copy request, theflash storage device 3 reads data D1 from block BLK1 and writes the readdata into block BLK34, thereby copying data D1 from block BLK1 to blockBLK34 of block group 43.

When a plurality of valid data portions stored in block BLK1 areclassified into different groups, the copy destination block groups towhich these valid data portions should be copied are different from eachother.

In the case where a valid data portion stored in block BLK1 isclassified into group #1 again, copy operation for this valid dataportion may not be performed, or the copy operation of copying the validdata portion to the current write destination block for block group 41corresponding to group #1 may be performed.

FIG. 9 is a block diagram for explaining the operation of writing datahaving the same estimated lifetime to the same block, the operation of,when the elapsed time from the time point at which a block has beenfilled with write data exceeds a period, notifying the host 2 of theidentifier of each of the data portions stored in the block, theoperation of copying the data portions stored in the block to a blockgroup for storing data having another estimated lifetime in response toa request from the host 2, and the operation of invalidating a dataportion stored in the block in response to a request from the host.

When the host 2 receives an LBA list from the flash storage device 3,the host 2 is capable of requesting the flash storage device 3 to copy adata portion corresponding to a specific LBA included in the LBA list,and is also capable of requesting the flash storage device 3 toinvalidate a data portion corresponding to another specific LBA includedin the LEA list.

It is assumed that, in block group 41, the elapsed time from the timepoint at which block BLK1 has been filled with write data exceeds aperiod (a day) corresponding to block group 41. In this case, thecontroller 4 notifies the host 2 of a list of the LBAs of the valid dataportions stored in block BLK1 or a list of the LBAs of all the dataportions stored in block BLK1.

The host 2 reestimates the lifetime of each valid data portion stored inblock BLK1. For example, when the reestimated new lifetime of a dataportion stored in block BLK1 is three days, the host 2 transmits, to theflash storage device 3, a copy request (copy command) to copy the validdata portion from block BLK1 to block group 42 (for example, the currentwrite destination block BLK26 of block group 42). When the host 2determines that another valid data portion stored in block BLK1 is nolonger necessary, the host 2 transmits an invalidation request (trimcommand) specifying the valid data portion as an invalidation targetdata portion to the flash storage device 3.

Based on the copy request received from the host 2, the controller 4copies the data portion specified as copy target data by the copyrequest from block BLK1 to block group 42. Based on the invalidationrequest received from the host 2, the controller 4 invalidates the dataportion in block BLK1 specified as invalidation target data by theinvalidation request.

Similarly, for example, when, in block group 42, the elapsed time fromthe time point at which block BLK21 has been filled with write dataexceeds a period (three days) corresponding to block group 42, thecontroller 4 notifies the host 2 of a list of the LBAs of the valid dataportions stored in block BLK21 or a list of the LBAs of all the dataportions stored in block BLK21.

The host 2 reestimates the lifetime of each valid data portion stored inblock BLK21. For example, when the reestimated new lifetime of a dataportion stored in block BLK21 is seven days, the host 2 transmits, tothe flash storage device 3, a copy request (copy command) to copy thevalid data portion from block BLK21 to block group 43 (for example, thecurrent write destination block BLK34 of block group 43). When the host2 determines that another valid data portion stored in block BLK21 is nolonger necessary, the host 2 transmits an invalidation request (trimcommand) specifying the valid data portion as an invalidation targetdata portion to the flash storage device 3.

Similarly, for example, when, in block group 43, the elapsed time fromthe time point at which block BLK31 has been filled with write dataexceeds a period (seven days) corresponding to block group 43, thecontroller 4 notifies the host 2 of a list of the LBAs of the valid dataportions stored in block BLK31 or a list of the LBAs of all the dataportions stored in block BLK31.

The host 2 reestimates the lifetime of each valid data portion stored inblock BLK31. For example, when the reestimated new lifetime of a dataportion stored in block BLK31 is a month, the host 2 transmits, to theflash storage device 3, a copy request (copy command) to copy the validdata portion from block BLK31 to block group 44 (for example, thecurrent write destination block BLK47 of block group 44). When the host2 determines that another valid data portion stored in block BLK31 is nolonger necessary, the host 2 transmits an invalidation request (trimcommand) specifying the valid data portion as an invalidation targetdata portion to the flash storage device 3.

Similarly, for example, when, in block group 44, the elapsed time fromthe time point at which block BLK41 has been filled with write dataexceeds a period (a month) corresponding to block group 44, thecontroller 4 notifies the host 2 of a list of the LBAs of the valid dataportions stored in block BLK41 or a list of the LBAs of all the dataportions stored in block BLK41.

FIG. 10 is a diagram for explaining the operation of changing a blockgroup in which data is stored from a block group for storing data havinga short lifetime to a group block for storing data having a longlifetime.

FIG. 10 assumes a case where the storage destination block group of eachvalid data portion is changed in the order of block group 41, blockgroup 42, block group 43 and block group 44.

Firstly, each write data portion classified into a period (a day)corresponding to group #1 is written into the current write destinationblock of block group 41 corresponding to group #1. When this currentwrite destination block is filled with write data, the current writedestination block becomes an active block of block group 41. A new writedestination block for block group 41 is allocated, and each subsequentwrite data portion classified into a period (a day) corresponding togroup #1 is written into the new write destination block for block group41.

Thus, data classified into a period (a day) corresponding to group #1are stored in the active blocks (blocks BLK1 to BLK7) of block group 41.

Valid data in a block which belongs to block group 41 and in which theelapsed time from the time point at which the block has been filled withwrite data exceeds a day becomes a copy candidate. The host 2reestimates the new lifetime of these valid data portions. When thereestimated lifetime of these valid data portions is three days, thesevalid data portions (the old data of group #1) are copied to the currentwrite destination block of block group 42.

Thus, the old data of group #1 are stored in the blocks (blocks BLK21 toBLK26) of block group 42.

Valid data in a block which belongs to block group 42 and in which theelapsed time from the time point at which the block has been filled withwrite data exceeds three days becomes a copy candidate. The host 2reestimates the new lifetime of these valid data portions. When thereestimated lifetime of these valid data portions is seven days, thesevalid data portions (the old data of group #2) are copied to the currentwrite destination block of block group 43.

Thus, the old data of group #2 are stored in the blocks (blocks BLK31 toBLK34) of block group 43.

Valid data in a block which belongs to block group 43 and in which theelapsed time from the time point at which the block has been filled withwrite data exceeds seven days becomes a copy candidate. The host 2reestimates the new lifetime of these valid data portions. When thereestimated lifetime of these valid data portions is a month, thesevalid data portions (the old data of group #3) are copied to the currentwrite destination block of block group 44.

Thus, the old data of group #3 are stored in the blocks (blocks BLK41 toBLK47) of block group 44.

FIG. 11 is a flowchart illustrating the procedure of the operation ofallocating a block in which the degree of wear is less to data having along lifetime and allocating a block in which the degree of wear isgreat to data having a short lifetime, and the procedure of theoperation of changing the accuracy of program operation based on thelifetime of the data to be written.

The data retention period of each block of the NAND flash memory 5normally relies on the number of rewrites (the number of program/erasecycles) of the block. As the degree of wear of a block in which thenumber of rewrites is less is comparatively less, the block is capableof continuing to normally store data in a comparatively long period. Asthe degree of wear of a block in which the number of rewrites is greatis comparatively great, the data retention period which is the periodfor continuing to normally store data may be comparatively short.

In consideration of the above matters, based on the number of rewrites(also referred to as the number of program/erase cycles) of each freeblock in the NAND flash memory 5, the controller 4 classifies the freeblocks in the NAND flash memory 5 into a first free block group having afirst degree of wear (the group of the first degree of wear), a secondfree block group having a second degree of wear greater than the firstdegree of wear (the group of the second degree of wear), a third freeblock group having a third degree of wear greater than the second degreeof wear (the group of the third degree of wear) and a fourth free blockgroup having a fourth degree of wear greater than the third degree ofwear (the group of the fourth degree of wear) (step S21).

The controller 4 allocates a free block belonging to the group havingthe least degree of wear (the group of the first degree of wear) as awrite destination block for block group 44 for storing data in which thelifetime is a month (step S22).

The controller 4 allocates a free block belonging to the group of thesecond degree of wear as a write destination block for block group 43for storing data in which the lifetime is seven days (step S23).

The controller 4 allocates a free block belonging to the group of thethird degree of wear as a write destination block for block group 42 forstoring data in which the lifetime is three days (step S24).

The controller 4 allocates a free block belonging to the group havingthe greatest degree of wear (the destination block for block group 41for storing data in which the lifetime is a day (step S25).

In this way, write destination blocks having characteristics suitablefor the data retention periods required for a plurality of block groups41 to 44 can be allocated to block groups 41 to 44, respectively.

The controller 4 is capable of changing program operation for each blockgroup as needed. Normally, when high-accuracy program operation foraccurately setting the threshold voltage of a memory cell so as to bethe target threshold voltage is performed, the data retention period ofthe memory cell is comparatively long. However, this program operationis time consuming. The time required for low-accuracy program operationfor setting the threshold voltage of a memory cell so as to be thetarget threshold voltage with low accuracy is short. However, the dataretention time of the memory cell is comparatively short.

Therefore, the controller 4 applies a plurality of types of programoperations having different accuracies to block groups 41 to 44.

The controller 4 determines whether or not the period identified by thelifetime information of a write command received from the host 2 is amonth (step S26).

When the period identified by the lifetime information of the receivedwrite command is a month (YES in step S26), the controller 4 writeswrite data associated with the write command into a write destinationblock allocated for block group 44, using high-accuracy programoperation (step S27).

When the period identified by the lifetime information of the receivedwrite command is not a month (NO in step S26), the controller 4determines whether or not the period identified by the lifetimeinformation of the write command received from the host 2 is seven days(step S28).

When the period identified by the lifetime information of the receivedwrite command is seven days (YES in step S28), the controller 4 writeswrite data associated with the write command into a write destinationblock allocated for block group 43, using intermediate-accuracy programoperation (step S29).

When the period identified by the lifetime information of the receivedwrite command is not seven days (NO in step S28), the controller 4determines whether or not the period identified by the lifetimeinformation of the write command received from the host 2 is three days(step S30).

When the period identified by the lifetime information of the receivedwrite command is three days (YES in step S30), the controller 4 writeswrite data associated with the write command into a write destinationblock allocated for block group 42, using intermediate-accuracy programoperation (step S31).

When the period identified by the lifetime information of the receivedwrite command is not three days (NO in step S30), the controller 4determines whether or not the period identified by the lifetimeinformation of the write command received from the host 2 is a day (stepS32).

When the period identified by the lifetime information of the receivedwrite command is a day (YES in step S32), the controller 4 writes writedata associated with the write command into a write destination blockallocated for block group 41, using low-accuracy program operation (stepS33).

FIG. 12 illustrates a write command issued to the flash storage device3.

A write command is a command to request the flash storage device 3 towrite data. The write command may include a command ID, lifetimeinformation, a tag, a length, a write buffer address, etc.

The command ID is the unique identifier of the command (here, the writecommand). The lifetime information is information for identifying aperiod corresponding to the lifetime of the write data to be written.The lifetime information may be indicative of the time length of aperiod corresponding to the lifetime of write data as described above.Alternatively, the lifetime information may be an identifier associatedwith the period.

The tag is an identifier for identifying the write data to be written.The tag may be a logical address such as an LBA or a user address (forexample, a key of a key-value store or the hash value of the key) asdescribed above.

The length is indicative of the size of the write data to be written.The write buffer address is indicative of the location in the memory(host memory) of the host 2 in which the write data to be written isstored. The write buffer address is also referred to as a data pointer.

FIG. 13 illustrates an address recording request transmitted from theflash storage device 3 to the host 2.

An address recording request is the above physical address notificationmessage, and is used to notify the host 2 of the physical addressindicative of the storage location (physical storage location) in theNAND flash memory 5 in which the write data associated with the writecommand is written. The address recording request may include a tag, aphysical address (block address and offset) and a length.

The tag is the tag included in the write command of FIG. 12. Thephysical address is indicative of the physical storage location in whichthe write data associated with the write command is written. Thephysical address is represented by a block address and an in-blockoffset. The length is indicative of the length of the written writedata.

FIG. 14 illustrates a read command issued to the flash storage device 3.

A read command is a command to request the flash storage device 3 toread data. The read command may include a command ID, a physicaladdress, a length and a read buffer address.

The command ID is the unique identifier of the command (here, the readcommand). The physical address is indicative of the physical storagelocation in which the data to be read is stored. The physical address isrepresented by a block address and an in-block offset. The length isindicative of the size of the data to be read. The read buffer addressis indicative of the location in the host memory to which the read datashould be transferred.

FIG. 15 illustrates a copy command issued to the flash storage device 3.

A copy command is a command to request the flash storage device 3 tocopy the data already written in the NAND flash memory 5 to anotherstorage location in the NAND flash memory 5.

The copy command is used to copy the copy target data included in thecopy source block having the source physical address specified by thehost 2 to the block having the destination physical address specified bythe host 2.

The copy command may include a command ID, a source physical address, adestination physical address and a bit map.

The command ID is the unique identifier of the copy command. The sourcephysical address is indicative of the address of the copy source blockin which the data to be copied is stored. The destination physicaladdress is indicative of the address of the copy destination block. Asdescribed above, the destination physical address may be the identifierof the copy destination block group (destination block group).

The bit map includes a plurality of bits corresponding to a plurality ofphysical storage locations in the copy source block, respectively. Thevalue of a bit “1” is indicative that the data portion stored in acorresponding physical storage location is copy target data. The valueof a bit “0” is indicative that the data portion stored in acorresponding physical storage location is not copy target data.

For example, as shown in FIG. 16, when the source physical addressincluded in a copy command is indicative of the physical address ofblock BLK1, and the bit map included in the copy command is indicativeof “1110000000000000”, the controller 4 determines only data portion D1,data portion D2 and data portion D3 as copy target data from dataportions D1 to D16 stored in block BLK1 based on the bit map“1110000000000000”.

FIG. 17 illustrates an erase command issued to the flash storage device3.

An erase command may include a command ID and a block address. Thecommand ID is the unique identifier of the erase command. The blockaddress is indicative of the block address of the erase target block.

FIG. 18 illustrates a trim command issued to the flash storage device 3.

A trim command is used as the above invalidation request specifying oneor more valid data portions stored in a block as invalidation targetdata. The trim command may include a command ID, a physical address anda length. The command ID is the unique identifier of the trim command.The physical address is indicative of the first physical address inwhich the data to be invalidated is stored. The physical address isrepresented by a block address and an in-block offset. The length isindicative of the size of the data to be invalidated.

FIG. 19 is a flowchart illustrating the procedure of write operationperformed in the flash storage device 3.

When the controller 4 receives a command from the host 2, the controller4 determines whether or not the received command is a write command(step S41).

When the received command is a write command (YES in step S41), thecontroller 4 determines which period (here, a day, three days, sevendays or a month) is identified by the lifetime information included inthe write command (steps S42, S44, S46 and S48).

When the period identified by the lifetime information is a day (YES instep S42), the controller 4 writes the write data associated with thewrite command into a write destination block allocated to block group 41(that is, a write destination block for a day) (step S43). Thecontroller 4 transmits the physical address indicative of the physicalstorage location in which the write data is written as an addressrecording request to the host 2 (step S50).

When the period identified by the lifetime information is three days(YES in step S44), the controller 4 writes the write data associatedwith the write command into a write destination block allocated to blockgroup 42 (that is, a write destination block for three days) (step S45).The controller 4 transmits the physical address indicative of thephysical storage location in which the write data is written as anaddress recording request to the host 2 (step S50).

When the period identified by the lifetime information is seven days(YES in step S46), the controller 4 writes the write data associatedwith the write command into a write destination block allocated to blockgroup 43 (that is, a write destination block for seven days) (step S47).The controller 4 transmits the physical address indicative of thephysical storage location in which the write data is written as anaddress recording request to the host 2 (step S50).

When the period identified by the lifetime information is a month (YESin step S48), the controller 4 writes the write data associated with thewrite command into a write destination block allocated to block group 44(that is, a write destination block for a month) (step S49). Thecontroller 4 transmits the physical address indicative of the physicalstorage location in which the write data is written as an addressrecording request to the host 2 (step S50).

FIG. 20 is a flowchart illustrating the procedure of copy operation andinvalidation operation performed in the flash storage device 3.

Regarding each of block group 41 to block group 44, the controller 4detects, of the blocks (active blocks) in which valid data is stored, ablock in which the elapsed time from the time point at which the blockhas been filled with write data exceeds a corresponding period (stepS51).

The controller 4 notifies the host 2 of a list of the LBAs of the validdata portions stored in the detected block or a list of the LBAs of allthe data portions stored in the detected block (step S53).

When the controller 4 receives a copy request (copy command) from thehost 2 (YES in step S53), the controller 4 copies one or more copytarget data portions specified by the copy request to the copydestination block group (for example, the write destination block of thecopy destination block group) specified by the copy request (step S54).

When the controller 4 receives an invalidation request (trim command)from the host 2 (YES in step S55), the controller 4 invalidates one ormore invalidation target data portions specified by the invalidationrequest (step S56).

When the controller 4 receives an erase request (erase command) from thehost 2 (YES in step S57), the controller 4 performs the erase operationof the block specified by the erase request and releases the block as afree block (step S58).

As explained above, according to the present embodiment, regarding eachof block group 41 to block group 44, the controller 4 detects, of theblocks (active blocks) in which valid data is stored, a block in whichthe elapsed time from the time point at which the block has been filledwith write data exceeds a corresponding period. For example, when thecontroller 4 detects, of the blocks in which valid data portions arestored and which belong to the first block group, a first block in whichthe elapsed time from the time point at which the block has been filledwith write data exceeds the first period (for example, a day)corresponding to the first block group, the controller 4 notifies thehost 2 of a list of the identifiers of the valid data portions stored inthe first block (or a list of the identifiers of all the data portionsstored in the detected block). In this way, it is possible to providethe host 2 with a chance to reestimate the new lifetime of each dataportion (valid data portion) stored in the first block. When a firstcopy request specifying one or more valid data portions stored in thefirst block as copy target data and specifying the second block groupfor storing data corresponding to the second period longer than thefirst period (for example, a day) as a copy destination block group isreceived from the host 2, the controller 4 copies one or more valid dataportions specified as copy target data from the first block to thesecond block group. In this way, data in which the actual lifetimebecomes longer than the first period (for example, a day) can berestored in a block group for storing data corresponding to a periodlonger than the first period.

Thus, in comparison with a case where all the valid data portions storedin the first block are maintained in the first block, a possibility thatall the data portions in each block are invalidated by erasing orupdating (rewriting) the data can be increased. In this way, the writeamplification of the flash storage device 3 can be reduced.

As described above, the present embodiment can provide the host 2 withinformation useful for reducing the write amplification of the flashstorage device 3, thereby improving the performance of the flash storagedevice 3.

In the present embodiment, the host 2 is notified of a list of theidentifiers of the valid data portions stored in the first block (or alist of the identifiers of all the data portions stored in the detectedblock). However, each of the valid data portions may be transmitted tothe host 2 together with a list of the identifiers of the valid dataportions stored in the first block. In this case, instead oftransmitting a copy request to the flash storage device 3, the host 2may transmit, to the flash storage device 3, a write command includingthe new lifetime information of a valid data portion which should berestored in another block group.

In the present embodiment, a NAND flash memory is exemplarilyillustrated as a nonvolatile memory. However, the function of theembodiment is also applicable to other various nonvolatile memories suchas a magnetoresistive random access memory (MRAM), a phase-change randomaccess memory (PRAM), a resistive random access memory (ReRAM) and aferroelectric random access memory (FeRAM).

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

What is claimed is:
 1. A memory system connectable to a host,comprising: a nonvolatile memory including a plurality of blocks; and acontroller electrically connected to the nonvolatile memory andconfigured to receive a write command from the host, the write commandincluding lifetime information capable of identifying a period to whichan estimated lifetime of write data belongs, wherein the controller isconfigured to: when the period identified by the lifetime information ofthe received write command is a first period, write the write data intoa first write destination block allocated for a first block group forstoring data having an estimated lifetime corresponding to the firstperiod, and when the first write destination block is filled with thewrite data, manage the first write destination block as a block in whicha valid data portion is stored and which belongs to the first blockgroup, and allocate a new first write destination block for the firstblock group; when the period identified by the lifetime information ofthe received write command is a second period longer than the firstperiod, write the write data into a second write destination blockallocated for a second block group for storing data having an estimatedlifetime corresponding to the second period, and when the second writedestination block is filled with the write data, manage the second writedestination block as a block in which a valid data portion is stored andwhich belongs to the second block group, and allocate a new second writedestination block for the second block group; detect, of blocks in whichvalid data portions are stored and which belong to the first blockgroup, a first block in which an elapsed time from a time point at whichthe block has been filled with the write data exceeds the first period;notify the host of a list of identifiers capable of identifying validdata portions stored in the first block or a list of identifiers capableof identifying all data portions stored in the first block; and whenreceiving, from the host, a first copy request specifying one or morevalid data portions stored in the first block as copy target data andspecifying the second block group as a copy destination block group,copy the one or more valid data portions specified as the copy targetdata from the first block to the second block group.
 2. The memorysystem of claim 1, wherein the controller is configured to: whenreceiving, from the host, a first invalidation request specifying one ormore valid data portions stored in the first block as invalidationtarget data, invalidate the one or more valid data portions specified asthe invalidation target data.
 3. The memory system of claim 1, whereinthe controller is configured to: based on a number of rewrites of eachfree block in the nonvolatile memory, classify the free blocks in thenonvolatile memory into a first free block group having a first degreeof wear and a second free block group having a second degree of weargreater than the first degree of wear; allocate a free block belongingto the first free block group as the second write destination block forthe second block group; and allocate a free block belonging to thesecond free block group as the first write destination block for thefirst block group.
 4. The memory system of claim 1, wherein thecontroller is configured to: when the period identified by the lifetimeinformation of the received write command is a third period longer thanthe second period, write the write data into a third write destinationblock allocated for a third block group for storing data having anestimated lifetime corresponding to the third period, and when the thirdwrite destination block is filled with the write data, manage the thirdwrite destination block as a block in which a valid data portion isstored and which belongs to the third block group, and allocate a newthird write destination block for the third block group.
 5. The memorysystem of claim 4, wherein the controller is configured to: whenreceiving, from the host, a second copy request specifying one or morevalid data portions stored in the first block as copy target data andspecifying the third block group as a copy destination block group, copythe one or more valid data portions specified as the copy target datafrom the first block to the third block group.
 6. The memory system ofclaim 4, wherein the controller is configured to: detect, of blocks inwhich valid data portions are stored and which belong to the secondblock group, a second block in which an elapsed time from a time pointat which the block has been filled with the write data exceeds thesecond period; notify the host of a list of identifiers capable ofidentifying valid data portions stored in the second block or a list ofidentifiers capable of identifying all data portions stored in thesecond block; and when receiving, from the host, a third copy requestspecifying one or more valid data portions stored in the second block ascopy target data and specifying the third block group as a copydestination block group, copy the one or more valid data portionsspecified as the copy target data from the second block to the thirdblock group.
 7. The memory system of claim 6, wherein, the controller isconfigured to: when receiving, from the host, a second invalidationrequest specifying one or more valid data portions stored in the secondblock as invalidation target data, invalidate the one or more valid dataportions specified as the invalidation target data.
 8. The memory systemof claim 1, wherein the controller is configured to: detect each validdata portion stored in the first block by referring to bit mapinformation indicative of validity or invalidity of each data portionstored in the first block; and notify the host of a list of identifierscapable of identifying each of the detected valid data portions.
 9. Thememory system of claim 1, wherein the lifetime information is indicativeof a time length of the first period or the second period.
 10. Thememory system of claim 1, wherein the lifetime information is indicativeof a first identifier associated with the first period or a secondidentifier associated with the second period.
 11. A method ofcontrolling a nonvolatile memory including a plurality of blocks, themethod comprising: receiving a write command from a host, the writecommand including lifetime information capable of identifying a periodto which an estimated lifetime of write data belongs; when the periodidentified by the lifetime information of the received write command isa first period, writing the write data into a first write destinationblock allocated for a first block group for storing data having anestimated lifetime corresponding to the first period; when the firstwrite destination block is filled with the write data, managing thefirst write destination block as a block in which a valid data portionis stored and which belongs to the first block group, and allocating anew first write destination block for the first block group; when theperiod identified by the lifetime information of the received writecommand is a second period longer than the first period, writing thewrite data into a second write destination block allocated for a secondblock group for storing data having an estimated lifetime correspondingto the second period; when the second write destination block is filledwith the write data, managing the second write destination block as ablock in which a valid data portion is stored and which belongs to thesecond block group, and allocating a new second write destination blockfor the second block group; detecting, of blocks in which valid dataportions are stored and which belong to the first block group, a firstblock in which an elapsed time from a time point at which the block hasbeen filled with the write data exceeds the first period; notifying thehost of a list of identifiers capable of identifying valid data portionsstored in the first block or a list of identifiers capable ofidentifying all data portions stored in the first block; and whenreceiving, from the host, a first copy request specifying one or morevalid data portions stored in the first block as copy target data andspecifying the second block group as a copy destination block group,copying the one or more valid data portions specified as the copy targetdata from the first block to the second block group.
 12. The method ofclaim 11, further comprising: when receiving, from the host, a firstinvalidation request specifying one or more valid data portions storedin the first block as invalidation target data, invalidating the one ormore valid data portions specified as the invalidation target data. 13.The method of claim 11, further comprising: based on a number ofrewrites of each free block in the nonvolatile memory, classifying thefree blocks in the nonvolatile memory into a first free block grouphaving a first degree of wear and a second free block group having asecond degree of wear greater than the first degree of wear; allocatinga free block belonging to the first free block group as the second writedestination block for the second block group; and allocating a freeblock belonging to the second free block group as the first writedestination block for the first block group.
 14. The method of claim 11,further comprising: when the period identified by the lifetimeinformation of the received write command is a third period longer thanthe second period: writing the write data into a third write destinationblock allocated for a third block group for storing data having anestimated lifetime corresponding to the third period; and when the thirdwrite destination block is filled with the write data, managing thethird write destination block as a block in which a valid data portionis stored and which belongs to the third block group, and allocating anew third write destination block for the third block group.
 15. Themethod of claim 14, further comprising: when receiving, from the host, asecond copy request specifying one or more valid data portions stored inthe first block as copy target data and specifying the third block groupas a copy destination block group, copying the one or more valid dataportions specified as the copy target data from the first block to thethird block group.
 16. The method of claim 14, further comprising:detecting, of blocks in which valid data portions are stored and whichbelong to the second block group, a second block in which an elapsedtime from a time point at which the block has been filled with the writedata exceeds the second period; notifying the host of a list ofidentifiers capable of identifying valid data portions stored in thesecond block or a list of identifiers capable of identifying all dataportions stored in the second block; and when receiving, from the host,a third copy request specifying one or more valid data portions storedin the second block as copy target data and specifying the third blockgroup as a copy destination block group, copying the one or more validdata portions specified as the copy target data from the second block tothe third block group.
 17. The method of claim 16, further comprising:when receiving, from the host, a second invalidation request specifyingone or more valid data portions stored in the second block asinvalidation target data, invalidating the one or more valid dataportions specified as the invalidation target data.
 18. The method ofclaim 11, further comprising: detecting each valid data portion storedin the first block by referring to bit map information indicative ofvalidity or invalidity of each data portion stored in the first block;and notifying the host of a list of identifiers capable of identifyingeach of the detected valid data portions.
 19. The method of claim 11,wherein the lifetime information is indicative of a time length of thefirst period or the second period.
 20. The method of claim 11, whereinthe lifetime information is indicative of a first identifier associatedwith the first period or a second identifier associated with the secondperiod.